import * as actionTypes from './constants.js'


const initstate = {
    count: 0
}


function reducer(state = initstate, action) {
    switch (action.type) {
        case actionTypes.ADD_NUMBER:
            console.log('这是添加' + action.num)
            return {...state, count: state.count + action.num}
        default:
            return state
    }
}


export default reducer